﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="true" CodeBehind="AssignPKPIsEvaluation.aspx.cs" Inherits="BSCMFF.Web.Pages.Evaluation_Setup.AssignPKPIsEvaluation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

<bsc:EmployeeSelection ID="EmpSelection" runat="server" OnEventEmployeeChanged="EmployeeSelectionChanged"/>
<br />
<telerik:RadComboBox ID="RadComboBoxEvaluations" runat="server" 
        DataTextField="Name" 
        DataValueField="ID"
        DropDownWidth="300" Width="250"
        AppendDataBoundItems="true" 
        EmptyMessage="Select Evaluation" AutoPostBack="true" 
        onselectedindexchanged="RadComboBoxEvaluations_SelectedIndexChanged">
        <%--<Items>
            <telerik:RadComboBoxItem Text=". . ." runat="server" Value="0" />
        </Items>--%>
        <HeaderTemplate>
            <table style="width: 275px" cellspacing="0" cellpadding="0">
                <tr>
                    <td style="width:200px; padding-right:10px">
                        <asp:Label ID="LabelName" runat="server" Text="Name" ></asp:Label>
                    </td>
                    <td >
                        <asp:Label ID="LabelStartDate" runat="server" Text="Start Date" ></asp:Label>
                    </td>
                </tr>
             </table>
        </HeaderTemplate>
        <ItemTemplate>
            <table>
                <tr>
                    <td style="width:200px; padding-right:10px">
                        <%# Eval("Name")%>
                    </td>
            
                    <td>
                        <%# ((DateTime)Eval("StartDate")).ToShortDateString() %>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </telerik:RadComboBox>
<br />
    <telerik:RadGrid ID="RadGrid1" runat="server" >
<MasterTableView AutoGenerateColumns="False" >
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>

    <Columns>
        <telerik:GridBoundColumn DataField="Personal_KPI_ID" DataType="System.Int32" Visible="false"
            FilterControlAltText="Filter Personal_KPI_ID column" 
            HeaderText="Personal_KPI_ID" ReadOnly="True" SortExpression="Personal_KPI_ID" 
            UniqueName="Personal_KPI_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Name" 
            FilterControlAltText="Filter Name column" HeaderText="Name" ReadOnly="True" 
            SortExpression="Name" UniqueName="Name">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Description" 
            FilterControlAltText="Filter Description column" HeaderText="Description" 
            ReadOnly="True" SortExpression="Description" UniqueName="Description">
        </telerik:GridBoundColumn>
        
        <telerik:GridTemplateColumn > 
            <HeaderTemplate>
                <asp:Label ID="LabelCheckBox" runat="server" Text="Has Connection" ></asp:Label>
            </HeaderTemplate>
            <ItemTemplate> 
                <asp:CheckBox ID="CheckBoxConnection" runat="server" Checked='<%# Eval("Connection") %>'/>             
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn > 
            <HeaderTemplate>
                <asp:Label ID="LabelCheckBox" runat="server" Text="Connection Weight" ></asp:Label>
            </HeaderTemplate>
            <ItemTemplate> 
                <telerik:RadTextBox ID="RadTextBoxWeight" runat="server" Text='<%# Eval("Weight") %>'/>             
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
    </Columns>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>

<FilterMenu EnableImageSprites="False"></FilterMenu>

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>

    <telerik:RadButton ID="RadButtonUpdate" runat="server" 
        Text="Update Connections" onclick="RadButtonUpdate_Click">
    </telerik:RadButton>

    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableFlattening="False" EntitySetName="Personal_KPI" 
        Select="it.[Personal_KPI_ID], it.[Name], it.[Description]">
    </asp:EntityDataSource>

</asp:Content>
